﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace MrDev
{
    static class Logger
    {
        static string logFileName = "log.txt";
        static Logger()
        {
        }

        public static void LogError(string message)
        {
            LogMessage("ERROR", message);
        }
        public static void LogInfo(string message)
        {
            LogMessage("INFO", message);
        }
        public static void LogWarning(string message)
        {
            LogMessage("WARN", message);
        }

        private static void LogMessage(string type, string message)
        {
            File.AppendAllText(logFileName, string.Format("{0,-22}{1,-10}{2}" + Environment.NewLine, DateTime.Now, type, message));
        }

    }
}
